package com.starrin.tennisfinder.model;

import java.io.Serializable;

/**
 * User: Starrin
 * Date: 2013-10-26
 * Time: 13:57
 */
public class HourAvailability implements Comparable<HourAvailability>, Serializable {
    private Integer hour;
    private BookingStatus bookingStatus;
    private String bookingLink = "";

    public HourAvailability(Integer hour, BookingStatus bookingStatus, String bookingLink) {
        this.hour = hour;
        this.bookingStatus = bookingStatus;
        this.bookingLink = bookingLink;
    }

    public Integer getHour() {
        return hour;
    }

    public void setHour(Integer hour) {
        this.hour = hour;
    }

    public BookingStatus getBookingStatus() {
        return bookingStatus;
    }

    public void setBookingStatus(BookingStatus bookingStatus) {
        this.bookingStatus = bookingStatus;
    }

    public String getBookingLink() {
        return bookingLink;
    }

    public void setBookingLink(String bookingLink) {
        this.bookingLink = bookingLink;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        HourAvailability that = (HourAvailability) o;

        if (!hour.equals(that.hour)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return hour.hashCode();
    }

    @Override
    public int compareTo(HourAvailability o) {
        return this.getHour().compareTo(o.getHour());
    }
}
